/**
 * 
 * If you have edited the file, please update
 * all the last-modified fields manually. Thanks!
 *
 * @last-modified by: 
 * @last-modified date: 
 * @last-modified time: 
 *
 * @author Swee Zhi
 * @date-created Sep 12, 2011    @time-created 6:57:41 PM
 *
 * @project: 
 * @module: 
 * @institution: 
 *
 */
package util.enumhelper;

import util.enumeration.Country;
import util.enumeration.CountryISOCodes;

public class CountryCodes {
//    Country country;
//	
//    public CountryCodes() {
//        
//    }

    // alphabetical order
    public static CountryISOCodes getISOCode(Country country) {
        CountryISOCodes code = null;
        
        switch (country) {
            case ALBANIA: code = CountryISOCodes.AL; break;
            case ALGERIA: code = CountryISOCodes.DZ; break;
            case ARGENTINA: code = CountryISOCodes.AR; break;
            case AUSTRALIA: code = CountryISOCodes.AU; break;
            case AUSTRIA: code = CountryISOCodes.AT; break;
            case BAHRAIN: code = CountryISOCodes.BH; break;
            case BELARUS: code = CountryISOCodes.BE; break;
            case BELGIUM: code = CountryISOCodes.BE; break;
            case BOLIVIA: code = CountryISOCodes.BO; break;
            case BOSNIA_AND_HERZEGOVINA: code = CountryISOCodes.BA; break;
            case BRAZIL: code = CountryISOCodes.BR; break;
            case BULGARIA: code = CountryISOCodes.BG; break;
            case CANADA: code = CountryISOCodes.CA; break;
            case CHILE: code = CountryISOCodes.CL; break;
            case CHINA: code = CountryISOCodes.CN; break;
            case COLOMBIA: code = CountryISOCodes.CO; break;
            case COSTA_RICA: code = CountryISOCodes.CR; break;
            case CROATIA: code = CountryISOCodes.HR; break;
            case CYPRUS: code = CountryISOCodes.CY; break;
            case CZECH_REPUBLIC: code = CountryISOCodes.CZ; break;
            case DOMINICAN_REPUBLIC: code = CountryISOCodes.DO; break;
            case ECUADOR: code = CountryISOCodes.EC; break;
            case EGYPT: code = CountryISOCodes.EG; break;
            case EL_SALVADOR: code = CountryISOCodes.SV; break;
            case ESTONIA: code = CountryISOCodes.EE; break;
            case FINLAND: code = CountryISOCodes.FI; break;
            case FRANCE: code = CountryISOCodes.FR; break;
            case GERMANY: code = CountryISOCodes.DE; break;
            case GREECE: code = CountryISOCodes.GR; break;
            case GUATEMALA: code = CountryISOCodes.GT; break;
            case HONG_KONG: code = CountryISOCodes.HK; break;
            case HUNGARY: code = CountryISOCodes.HU; break;
            case ICELAND: code = CountryISOCodes.IS; break;
            case INDIA: code = CountryISOCodes.IN; break;
            case INDONESIA: code = CountryISOCodes.ID; break;
            case IRAQ: code = CountryISOCodes.IQ; break;
            case IRELAND: code = CountryISOCodes.IE; break;
            case ISRAEL: code = CountryISOCodes.IL; break;
            case ITALY: code = CountryISOCodes.IT; break;
            case JAPAN: code = CountryISOCodes.JP; break;
            case JORDAN: code = CountryISOCodes.JO; break;
            case KUWAIT: code = CountryISOCodes.KW; break;
            case LATVIA: code = CountryISOCodes.LV; break;
            case LEBANON: code = CountryISOCodes.LB; break;
            case LIBYA: code = CountryISOCodes.LY; break;
            case LITHUANIA: code = CountryISOCodes.LT; break;
            case LUXEMBOURG: code = CountryISOCodes.LU; break;
            case MACEDONIA: code = CountryISOCodes.MK; break;
            case MALAYSIA: code = CountryISOCodes.MY; break;
            case MALTA: code = CountryISOCodes.MT; break;
            case MEXICO: code = CountryISOCodes.MX; break;
            case MONTENEGRO: code = CountryISOCodes.ME; break;
            case MOROCCO: code = CountryISOCodes.MA; break;
            case NETHERLANDS: code = CountryISOCodes.NL; break;
            case NEW_ZEALAND: code = CountryISOCodes.NZ; break;
            case NICARAGUA: code = CountryISOCodes.NI; break;
            case NORWAY: code = CountryISOCodes.NO; break;
            case OMAN: code = CountryISOCodes.OM; break;
            case PANAMA: code = CountryISOCodes.PA; break;
            case PARAGUAY: code = CountryISOCodes.PY; break;
            case PERU: code = CountryISOCodes.PE; break;
            case PHILIPPINES: code = CountryISOCodes.PH; break;
            case POLAND: code = CountryISOCodes.PL; break;
            case PORTUGAL: code = CountryISOCodes.PT; break;
            case PUERTO_RICO: code = CountryISOCodes.PR; break;
            case QATAR: code = CountryISOCodes.QA; break;
            case ROMANIA: code = CountryISOCodes.RO; break;
            case RUSSIA: code = CountryISOCodes.RU; break;
            case SAUDI_ARABIA: code = CountryISOCodes.RW; break;
            case SERBIA: code = CountryISOCodes.RS; break;
//                case SERBIA_AND_MONTENEGRO: code = CountryISOCodes.; break;
            case SINGAPORE: code = CountryISOCodes.SG; break;
            case SLOVAKIA: code = CountryISOCodes.SK; break;
            case SLOVENIA: code = CountryISOCodes.SI; break;
            case SOUTH_AFRICA: code = CountryISOCodes.ZA; break;
            case SOUTH_KOREA: code = CountryISOCodes.KR; break;
            case SPAIN: code = CountryISOCodes.ES; break;
            case SUDAN: code = CountryISOCodes.SD; break;
            case SWITZERLAND: code = CountryISOCodes.CH; break;
            case SYRIA: code = CountryISOCodes.SY; break;
            case TAIWAN: code = CountryISOCodes.TW; break;
            case THAILAND: code = CountryISOCodes.TH; break;
            case TUNISIA: code = CountryISOCodes.TN; break;
            case TURKEY: code = CountryISOCodes.TR; break;
            case UKRAINE: code = CountryISOCodes.UA; break;
            case UNITED_ARAB_EMIRATES: code = CountryISOCodes.AE; break;
            case UNITED_KINGDOM: code = CountryISOCodes.GB; break;
            case UNITED_STATES: code = CountryISOCodes.US; break;
            case URUGUAY: code = CountryISOCodes.UY; break;
            case VENEZUELA: code = CountryISOCodes.VE; break;
            case VIETNAM: code = CountryISOCodes.VN; break;
            case YEMEN: code = CountryISOCodes.YE; break;
        }
        return code;
    }
}
